package com.example.kai.uno.guide;

import android.content.Context;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.example.kai.uno.R;

public class SetDot {public  SetDot(ImageView[] imageView, LinearLayout dot, Context context){
    for (int i=0; i < imageView.length;i++){
        ImageView imageViewLocal = new ImageView(context);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT);

        //控件，绑定到这个LinerLayout里面
        imageViewLocal.setLayoutParams(layoutParams);
        //给空数组赋值
        imageView[i] = imageViewLocal;
        //默认初始界面为红色圆点
        if (i == 0){
            imageView[i].setImageResource(R.drawable.grey_point);
        } else {
            imageView[i].setImageResource(R.drawable.white_point);
        }
        dot.addView(imageViewLocal);
    }
}
}
